package com.qf.controller;

import com.qf.config.AliyunProperties;
import com.qf.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class Demo5Controller {
    @Value("${aliyun.accessKey}")
    private String accessKey;
    @Autowired
    private AliyunProperties aliyunProperties;
    @GetMapping("/a")
    public R f(){
        System.out.println(accessKey);
        return R.success();
    }
    @GetMapping("/yml")
    public AliyunProperties test(){
        System.out.println("-------");
        return aliyunProperties;
    }
}
